// The Vue build version to load with the `import` command
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
import Vue from 'vue'
import App from './App'
import VueRouter from 'vue-router'

import Hello from './components/Hello'
import First from './component/first'

Vue.config.productionTip = false

Vue.use(VueRouter)
/* eslint-disable no-new */

//配置路劲
//注意component
const routes = [
  {path:'/Hello',component:Hello},
  {path:'/First',component:First},
]

//实例化对象

const router = new VueRouter({
  routes:routes
})
new Vue({
  el: '#app',
  template: '<App/>',
  components: { App },
  router
}).$mount('#app')
